package com.ljq.software_springboot.softwareprogram.controller;


import com.ljq.software_springboot.softwareprogram.entity.Account;
import com.ljq.software_springboot.softwareprogram.entity.Friendship;
import com.ljq.software_springboot.softwareprogram.imp.FriendshipServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2024-12-28
 */
@RestController
@RequestMapping("/friendship")
@CrossOrigin(origins = "http://localhost:5173")
public class FriendshipController {
    @Autowired
    FriendshipServiceImpl   friendshipService;
    @PostMapping("find")
    public List<Account> find(@RequestBody  Friendship friendship) {
        return friendshipService.find(friendship.getId());
    }
}
